package com.nba.common.exception;

import java.io.Serializable;

import com.nba.common.utils.EnumVal;
import com.nba.common.utils.Environment;



public enum ErrorCode implements EnumVal,Serializable {
    
    /**参数验证错误*/
    PARAM_VALIDATE  (10000,"参数验证错误"),
    NO_LOGIN(100001,"用户未登陆！"),
    FILE_NAME_ERROR(100003, "请检查文件名是否正确！"),
    FILE_SIZE_OVERFLOW(100004, "文件大小超出限制！"),
    FILE_SAVE_ERROR(100005, "文件保存失败！"),
    PIC_SUFFIX_ERROR(100006, "上传图片格式不正确，"+"目前只支持 " + Environment.IMG_SUFFIX+" 类型文件上传!"),
    DB_SAVE_ERROR(100008, "数据库保存失败！"),
    URL_TAB_NORECORD(100009, "error! sys_url table is null! Please insert a record into the table sys_url."),
    URL_TAB_NODEFINED(100010, "error! no url defined!Please insert a record into the table sys_url.")
    
    
    
    
    
    
    ;
    
    
    private int code;
    private String msg;

    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
